@extends('admin.container')

@section('c-head')
    <script type="text/javascript">
        var PAGE_DATA = {
            REST_API: {
                addrProvince: "{{route('area.province')}}", //一级地区
                addrCity: "{{route('area.city')}}", //二级地区
                addrCounty: "{{route('area.county')}}", //三级地区
                get_supplyInfo_list_url: "{{route('admin.trade.provider.index')}}", //供应信息列表
                get_buyerInfo_list_url: "{{route('admin.trade.purchaser.index')}}", //采购信息列表
                secendCategory: "secendCategory", // 获取分类数据,搜索
                update_state_url: "{{route('admin.trade.provider.batch-remove')}}", //批量修改供应信息
                buyerupdate_state_url: "{{route('admin.trade.purchaser.batch-remove-buyer')}}", //批量修改采购信息
            }
        };
    </script>
@stop

@section('c-body')
    <div class="comm-title">
        <span class="title-msg">供求信息</span>
    </div>
    <div class="comm-body">
        <div class="am-btn-group" style="margin-top: 22px;">
            <button type="button" class="am-btn am-btn-primary
 am-btn-sm " id="supply_info" code="0">
                <span style="width:90px;display:block;">供应信息</span>
            </button>
            <button type="button" class="am-btn am-btn-default am-btn-sm" id="buyer_info" code="1">
                <span style="width:90px;display:block;">求购信息</span>
            </button>
        </div>
        <div class="tab-body ">
            <div class="supplyList-screen mt20">
                <div class="supplyList-screen-main">
                    <div class="sl-screen-box">
                        <div>
                            <span>供应商名称：</span>
                            <input type="text" style="width: 140px;height: 30px;" id="username">
                            <span class=" lh30 c-gray">发布日期：</span>
                            <input type="text" readonly="readonly" class="sel-order-time time" id="time1">
                            <input type="text" readonly="readonly" class="sel-order-time time" id="time2">

                            <span class="ml5 lh30 c-gray">所在地区：</span>
                            <select class="district" id="province">
                            </select>
                            <select class="district" id="city" style="display: none">
                            </select>
                            <select class="district" id="county" style="display: none">
                            </select>
                            <button id="search-btn" type="button" class="am-btn am-btn-success am-btn-xs ml10">搜索</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 表单列表 -->
            <div class="clearfix supply_info dn" style="display: block;">
                <table class="am-table am-table-striped am-table-hover am-table-centered shopadmin-list mt20 supplyinfo-table" style="  border-bottom: 1px solid #ddd;">
                    <thead>
                    <tr>
                        <th style="width:5%">
                            <span style="visibility:hidden;">1</span>
                        </th>
                        <th>产品名称</th>
                        <th>价格（元）</th>
                        <th>单位</th>
                        <th>数量</th>
                        <th>起订量</th>
                        <th>发布日期</th>
                        <th>地区</th>
                        <th>供应商名称</th>
                        <th style="width:15%">操作</th>
                    </tr>
                    </thead>
                    <tbody class="shopadmin-list-body shopadmin-l-b" id="supplyInfo-context">
                    </tbody>
                </table>
                <div class="tool-bar-bottom clearfix">
                    <div class="unit">
                        <input id="sel-all-chk" type="checkbox" class="mid" style="position: relative; top:13px;" />
                    </div>
                    <div class="unit">
                        <label for="sel-all-chk" style="cursor:pointer;font-weight:300;">全选</label>
                    </div>
                    <div class="unit" style="width: auto;">
                        <button id=" " type="button" class="am-btn am-btn-secondary am-btn-xs ml10  update-all-btn" style="position: relative;float:left;top:5px;" code="1">屏蔽</button>
                        <button id="" type="button" class="am-btn am-btn-success am-btn-xs ml10 all-recovery-btn update-all-btn" style="position: relative;float:left;top:5px;" code="0">恢复</button>
                    </div>
                </div>
                <div id="comm-paging-0" class="admin-paging" current-page="1"></div>
            </div>
            <!-- 表单列表 -->
            <div class="clearfix buyer_info dn" style="display: none">
                <table class="am-table am-table-striped am-table-hover am-table-centered shopadmin-list mt20 supplyinfo-table" style="border-bottom: 1px solid #ddd;">
                    <thead>
                    <tr>
                        <th style="width:5%">
                            <span style="visibility:hidden;">1</span>
                        </th>
                        <th>产品名称</th>
                        <th>价格（元）</th>
                        <th>单位</th>
                        <th>数量</th>
                        <th>发布日期</th>
                        <th>地区</th>
                        <th>供应商名称</th>
                        <th style="width:15%">操作</th>
                    </tr>
                    </thead>
                    <tbody class="shopadmin-list-body shopadmin-l-b" id="buyerInfo-context">
                    </tbody>
                </table>
                <div class="tool-bar-bottom clearfix">
                    <div class="unit">
                        <input id="sel-all-chk1" type="checkbox" class="mid" style="position: relative; top:13px;" />
                    </div>
                    <div class="unit">
                        <label for="sel-all-chk1" style="cursor:pointer;font-weight:300;">全选</label>
                    </div>
                    <div class="unit" style="width: auto;">
                        <button id="" type="button" class="am-btn am-btn-secondary am-btn-xs ml10 all-shield-btn update-buyer-btn" style="position: relative;float:left;top:5px;" code="1">屏蔽</button>
                        <button id="" type="button" class="am-btn am-btn-success am-btn-xs ml10  all-recovery-btn update-buyer-btn" style="position: relative;float:left;top:5px;" code="0">恢复</button>
                    </div>
                </div>
                <div id="comm-paging-1" class="admin-paging" current-page="1"></div>
            </div>
        </div>
    </div>
    <script type="text/template" id="districtTemp">
        <option value="">请选择</option>
        <%_.each(obj, function(item){%>
        <option value="<%=item.code%>">
            <%=item.text%>
        </option>
        <%})%>
    </script>
    <script type="text/template" id="supplyListTemp">
        <%_.each(obj, function(item){%>
        <tr>
            <td class="sel-chk">
                <input type="checkbox" id="<%=item.id%>" />
            </td>
            <td style="max-width: 120px" title="<%=item.productname%>">
                <%=item.productname%>
            </td>
            <td>￥
                <%=item.price%>
            </td>
            <td>
                <%=item.unit%>
            </td>
            <td>
                <%=item.num%>
            </td>
            <%if(item.minimum){%>
            <td>
                <%=item.minimum%>
            </td>
            <%}else{%>
            <%}%>
            <td>
                <span class="tc" style="padding-left: 20px;"><%=item.releasedate%></span>
            </td>
            <td>
                <%=item.district%>
            </td>
            <td title="<%=item.suppliername%>" style="max-width: 150px">
                <%=item.suppliername%>
            </td>
            <td style="width:15%">
                <div class="operate-btns-2 clearfix" style="width: 50px;">
                    <%if(item.state=="1"){%>
                    <button id="" type="button" class="edit-brand-btn am-btn am-btn-secondary am-btn-xs recovery-btn" style="float:left;" href="<%=item.screenurl%>" name="0" code="<%=item.id%>">屏蔽</button>
                    <%}else{%>
                    <button id="" type="button" class="edit-brand-btn am-btn am-btn-success am-btn-xs recovery-btn" style="float:left;" href="<%=item.screenurl%>" name="1" code="<%=item.id%>">恢复</button>
                    <%}%>
                </div>
            </td>
        </tr>
        <%})%>
    </script>
    <script src="/assets/b2b/admin/js/pages/15-16.js"></script>


@stop